package com.ruoyi.product.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * SPU关联的规格属性对象 product_spu_spec
 * 
 * @author liuhizhong
 * @date 2025-07-11
 */
public class ProductSpuSpec extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    private Long id;

    /** SPU ID */
    @Excel(name = "SPU ID")
    private Long spuId;

    /** 规格ID */
    @Excel(name = "规格ID")
    private Long specId;

    /** 是否必选（1-是，0-否） */
    @Excel(name = "是否必选", readConverterExp = "1=-是，0-否")
    private Integer isRequired;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setSpuId(Long spuId) 
    {
        this.spuId = spuId;
    }

    public Long getSpuId() 
    {
        return spuId;
    }
    public void setSpecId(Long specId) 
    {
        this.specId = specId;
    }

    public Long getSpecId() 
    {
        return specId;
    }
    public void setIsRequired(Integer isRequired) 
    {
        this.isRequired = isRequired;
    }

    public Integer getIsRequired() 
    {
        return isRequired;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("spuId", getSpuId())
            .append("specId", getSpecId())
            .append("isRequired", getIsRequired())
            .toString();
    }
}
